//存储选中的语言
export const changeLanguage = (vm,lang) => {
    console.log('...changeLanguage: ',lang)
    vm.$i18n.locale = lang;
    localStorage.setItem("local", lang);
};
 
// 获取网站语言
export const getLanguage = () => {
    console.log('getLanguage: ',localStorage.getItem("local"))
  let browser = navigator.language ? navigator.language.split("-")[0] : "zh";
  let local = localStorage.getItem("local");
  return local || browser ;
};
 
//语言options
export const languageOptions = [
  { type: "zh", label: "中文" },
  { type: "ru", label: "Русский" },
];